<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$site.title|default=''}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC__/admin/style/admin.css" media="all">
    <link rel="stylesheet" href="__STATIC__/admin/style/style.css">
    <script src="__STATIC__/admin/layui/layui.js"></script>
    <script src="__STATIC__/admin/js/script.js"></script>
</head>
<body class="layui-layout-body">
<iframe id="hide_form" name="hide_form" style="display:none;"></iframe>
{__CONTENT__}
<form id="uploadForm" method="post" enctype="multipart/form-data" style="display: none">
    <input type="file" name="face" id="upload_file" accept="image/*;capture=camera">
</form>
{eq name="show_tips" value="1"}
<div id="newOrder" style="display:none"></div>
<script type="text/javascript">
    setInterval("gteMessages()", 3000);
    let $;
    layui.use(['jquery'], function () {
        $ = layui.jquery;
    });
    function gteMessages() {
        $.get('{:url("Messages/into")}', function (result) {
            if (result['status'] === 1){
                let data = result['data'];
                if (data.messages_data !== ''){
                    let audio_html = '<audio autoplay="autoplay" src="__STATIC__/upload/order/new_order.mp3"></audio>';
                    $('#newOrder').html(audio_html);
                    let html = '<div style="padding: 20px 100px;">'+ data.messages_data.contents +'</div>';
                    layer.open({
                        type: 1
                        ,offset: 'rb'
                        ,id: 'layerRb' //防止重复弹出
                        ,content: html
                        ,shade: 0 //不显示遮罩
                    });
                }
            }
        })
    }
</script>
{/eq}
</body>
</html>